﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UPMS.Core.Domain.Mapping
{
    public class ModuleMap : BaseMap<Module>
    {
        public ModuleMap()
        {
            this.ToTable("Upms_tbl_Module");
            this.Property(m => m.ApplicationId).HasColumnName("ApplicationId").IsRequired();
            this.Property(m => m.Name).HasColumnName("Name").HasMaxLength(64).IsRequired();
            this.HasRequired(m => m.Application).WithMany(a => a.Modules).HasForeignKey(m => m.ApplicationId);
        }
    }
}
